#include "Character.h"

Character::Character(sf::Vector2f position, int hpMax, AnimatedSpritePtr sprite)
: Entity(position, sprite)
, hpMax(hpMax)
, hpNow(hpMax)
{
    sprite->SetPosition(position);
}

Character::~Character()
{
}

bool Character::isAlive() const
{
	if (hpNow == 0)
	{
		return true;
	}
	return false;
}

int Character::getHealthNow() const
{
    return hpNow;
}

int Character::getHealthMax() const
{
    return hpMax;
}

void Character::setHealthMax(const int hpMax)
{
    this->hpMax = hpMax;
}

void Character::setHealthNow(const int hpNow)
{
    this->hpNow = hpNow;
}

void Character::move( const sf::Vector2f& distance )
{
    Entity::move(distance);
    getSprite()->Move(distance);
}

void Character::update(float delta)
{
}